{*
* 2007-2011 PrestaShop 
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <contact@prestashop.com>
*  @copyright  2007-2011 PrestaShop SA
*  @version  Release: $Revision: 6594 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}

{if isset($products) && count($products)}
<div id="crossselling" style="height:190px;">
	
	<script type="text/javascript" src="{$content_dir}modules/crossselling/js/crossselling.js"></script>
	<!--h2 class="productscategory_h2">{l s='Buy With:' mod='crossselling'}</h2-->

        <ul class="idTabs">
	                    <li><a href="#idTab3">{l s='Buy With' mod='crossselling'}</a></li> 
        </ul>

	<div id="{if count($products) > 5}crossselling{else}crossselling_noscroll{/if}">
		{if count($products) > 5}<a id="crossselling_scroll_left" title="{l s='Previous' mod='crossselling'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='crossselling'}</a>{/if}
		<div id="crossselling_list">
			<ul {if count($products) > 5}style="width: {math equation="width * nbImages" width=107 nbImages=$orderProducts|@count}px"{/if}>
				{foreach from=$products item=product name=for_products}
				<li {if count($products) < 6}style="margin-top: 10px;width: {math equation="width / nbImages" width=94 nbImages=$products|@count}%"{/if}>
						<a href="{$product->getLink()}" title="{$product->name|escape:html:'UTF-8'}" >
            <img src="{$link->getImageLink($product->link_rewrite, $product->id_image, 'home')}" alt="{$product->name|escape:html:'UTF-8'}" width="150" height="150" />
	</a>
                                                 <h5><a style="font-weight: bold;font-size: 12px;text-transform: uppercase;" href="{$product->getLink()}" title="{$product->name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product->name|truncate:27:'...'|escape:'htmlall':'UTF-8'}</a></h5>

				</li>
				{/foreach}
			</ul>
		</div>
	{if count($products) > 5}<a id="crossselling_scroll_right" title="{l s='Next' mod='crossselling'}" href="javascript:{ldelim}{rdelim}">{l s='Next' mod='crossselling'}</a>{/if}
	</div>
</div>
{/if}


<!--div id="crossselling">
    {foreach from=$products item=product name=for_products}
        <h5><a href="{$product->getLink()}" title="{$product->name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product->name|truncate:27:'...'|escape:'htmlall':'UTF-8'}</a></h5>
	<a href="{$product->getLink()}" title="{$product->name|escape:html:'UTF-8'}" >
            <img src="{$link->getImageLink($product->link_rewrite, $product->id_image, 'medium')}" alt="{$product->name|escape:html:'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}" />
	</a>
    {/foreach}
</div-->
